#ifndef _EDITLAYER_H_
#define _EDITLAYER_H_

#include <GameObject/Scene.h>
#include <Layer/Layer.h>
#include <memory>
#include <LogApp/LogApp.h>
#include <Project/Project.h>

namespace Edit
{
    class EditLayer : public Engine2D::Layer
    {
    public:
        EditLayer();
        virtual ~EditLayer() = default;
        virtual void OnAttach(void * = nullptr) override;
        virtual void OnUpdate(Engine2D::LayerArgs args) override;
        virtual void OnImGui() override;

    private:
        void ImGuiMainMenuBar();
        void ImGuiControlBar();
        void ImGuiSceneMenager();
        void ImGuiCenterArea();
        void ImGuiDebugArea();
        void ImGuiObjectAttributeConfig();
        template<typename T>
        bool ImGuiShowComponent(T & comp) { return true; }
        
        void SaveActiveScene();
        // void LoadActiveScene();

    private:
        ImGuiAppLog m_log;
        std::shared_ptr<Engine2D::Scene> m_activeScene;
        std::weak_ptr<Engine2D::IObject> m_activeObject;
        int m_windowFlags = 0;
    };
} // namespace Edit


#endif
